Page({
  data: {
    notifyList: []
  },
  onLoad() {
    // 调用获取通知列表
    this.getNotifyList()
  },
  /**
   * 获取通知列表
   * @returns 
   */
  async getNotifyList() {
    try {
      let { data: notifyList } = await wx.http({
        url: '/announcement',
      })
      this.setData({
        notifyList
      })
    } catch (error) {
      console.log('错误', error)
    }
  }
})
